<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/7/14
 * Time: 14:37
 */
namespace app\header\controller;

use think\Controller;
use think\Session;
class Header extends Controller {

    public function login($admin=0){
        Session::set('admin',$admin['name']);
        Session::has('admin');
        Session::get('admin');
//        var_dump($_SESSION);exit;
        foreach($_SESSION as $k => $v){
            $loginname=$v['admin'];
//            var_dump($loginname);exit;
        }
        $this->assign('loginname',$loginname);
        return $this->fetch("header");

    }

}
